3.261 \(\int \frac{(d+e x)^2}{b x+c x^2} \, dx\)

Optimal. Leaf size=42 \[ -\frac{(c d-b e)^2 \log (b+c x)}{b c^2}+\frac{d^2 \log (x)}{b}+\frac{e^2 x}{c} \]

[Out]

(e^2*x)/c + (d^2*Log[x])/b - ((c*d - b*e)^2*Log[b + c*x])/(b*c^2)

_______________________________________________________________________________________

Rubi [A]  time = 0.0903946, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105 \[ -\frac{(c d-b e)^2 \log (b+c x)}{b c^2}+\frac{d^2 \log (x)}{b}+\frac{e^2 x}{c} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x)^2/(b*x + c*x^2),x]

[Out]

(e^2*x)/c + (d^2*Log[x])/b - ((c*d - b*e)^2*Log[b + c*x])/(b*c^2)

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ e^{2} \int \frac{1}{c}\, dx + \frac{d^{2} \log{\left (x \right )}}{b} - \frac{\left (b e - c d\right )^{2} \log{\left (b + c x \right )}}{b c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((e*x+d)**2/(c*x**2+b*x),x)

[Out]

e**2*Integral(1/c, x) + d**2*log(x)/b - (b*e - c*d)**2*log(b + c*x)/(b*c**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0302237, size = 42, normalized size = 1. \[ \frac{-(c d-b e)^2 \log (b+c x)+b c e^2 x+c^2 d^2 \log (x)}{b c^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x)^2/(b*x + c*x^2),x]

[Out]

(b*c*e^2*x + c^2*d^2*Log[x] - (c*d - b*e)^2*Log[b + c*x])/(b*c^2)

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 61, normalized size = 1.5 \[{\frac{{e}^{2}x}{c}}+{\frac{{d}^{2}\ln \left ( x \right ) }{b}}-{\frac{b\ln \left ( cx+b \right ){e}^{2}}{{c}^{2}}}+2\,{\frac{\ln \left ( cx+b \right ) de}{c}}-{\frac{\ln \left ( cx+b \right ){d}^{2}}{b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((e*x+d)^2/(c*x^2+b*x),x)

[Out]

e^2*x/c+d^2*ln(x)/b-b/c^2*ln(c*x+b)*e^2+2/c*ln(c*x+b)*d*e-1/b*ln(c*x+b)*d^2

_______________________________________________________________________________________

Maxima [A]  time = 0.693834, size = 72, normalized size = 1.71 \[ \frac{e^{2} x}{c} + \frac{d^{2} \log \left (x\right )}{b} - \frac{{\left (c^{2} d^{2} - 2 \, b c d e + b^{2} e^{2}\right )} \log \left (c x + b\right )}{b c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2/(c*x^2 + b*x),x, algorithm="maxima")

[Out]

e^2*x/c + d^2*log(x)/b - (c^2*d^2 - 2*b*c*d*e + b^2*e^2)*log(c*x + b)/(b*c^2)

_______________________________________________________________________________________

Fricas [A]  time = 0.226047, size = 72, normalized size = 1.71 \[ \frac{b c e^{2} x + c^{2} d^{2} \log \left (x\right ) -{\left (c^{2} d^{2} - 2 \, b c d e + b^{2} e^{2}\right )} \log \left (c x + b\right )}{b c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2/(c*x^2 + b*x),x, algorithm="fricas")

[Out]

(b*c*e^2*x + c^2*d^2*log(x) - (c^2*d^2 - 2*b*c*d*e + b^2*e^2)*log(c*x + b))/(b*c
^2)

_______________________________________________________________________________________

Sympy [A]  time = 3.53863, size = 73, normalized size = 1.74 \[ \frac{e^{2} x}{c} + \frac{d^{2} \log{\left (x \right )}}{b} - \frac{\left (b e - c d\right )^{2} \log{\left (x + \frac{b c d^{2} + \frac{b \left (b e - c d\right )^{2}}{c}}{b^{2} e^{2} - 2 b c d e + 2 c^{2} d^{2}} \right )}}{b c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x+d)**2/(c*x**2+b*x),x)

[Out]

e**2*x/c + d**2*log(x)/b - (b*e - c*d)**2*log(x + (b*c*d**2 + b*(b*e - c*d)**2/c
)/(b**2*e**2 - 2*b*c*d*e + 2*c**2*d**2))/(b*c**2)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.205213, size = 73, normalized size = 1.74 \[ \frac{d^{2}{\rm ln}\left ({\left | x \right |}\right )}{b} + \frac{x e^{2}}{c} - \frac{{\left (c^{2} d^{2} - 2 \, b c d e + b^{2} e^{2}\right )}{\rm ln}\left ({\left | c x + b \right |}\right )}{b c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x + d)^2/(c*x^2 + b*x),x, algorithm="giac")

[Out]

d^2*ln(abs(x))/b + x*e^2/c - (c^2*d^2 - 2*b*c*d*e + b^2*e^2)*ln(abs(c*x + b))/(b
*c^2)